// 统一管理首页模块接口
import request from "@/utils/request";

enum API {
    HOSPITALDETAIL_URL='/hosp/hospital/',
    HOSPITALDEPARMENT_URL='/hosp/hospital/department/',
    GETUSERCODE_URL='/sms/send/',
    USERLOGIN_URL='/user/login',
    WXLOGIN_URL='/user/weixin/getLoginParam/',
    HOSPITALWORK_URL='/hosp/hospital/auth/getBookingScheduleRule/',
    HOSPITALDOCTOR_URL='/hosp/hospital/auth/findScheduleList/',
    GETUSER_URL='/user/patient/auth/findAll',
    GETDOCTOR_URL='/hosp/hospital/getSchedule/'
}

// 获取医院详情的接口
export const reqHospitalDetail = (hoscode:any)=>request.get<any,any>(API.HOSPITALDETAIL_URL+hoscode)

// 获取医院科室的接口
export const reqHospitalDeparment = (hoscode:any)=>request.get<any,any>(API.HOSPITALDEPARMENT_URL+hoscode)

// 获取验证码接口
export const reqCode = (phone:any)=>request.get<any,any>(API.GETUSERCODE_URL+phone)

// 用户登录的接口
export const reqUserLogin=(data:any)=>request.post<any,any>(API.USERLOGIN_URL,data)

// 获取微信扫码登录生成二维码的接口
export const reqWxLogin=(wxRedirectUri:any)=>request.get<any,any>(API.WXLOGIN_URL+`?wxRedirectUri=${wxRedirectUri}`)

// 获取某一个医院的一个科室预约挂号接口
export const reqHospitalWork =(page:any,limit:any,hoscode:any,depcode:any)=>request.get<any,any>(API.HOSPITALWORK_URL+`${page}/${limit}/${hoscode}/${depcode}`)

// 获取医院某一个科室相应医生排班的数据
export const reqHospitalDoctor = (hoscode:any,depcode:any,workDate:any)=>request.get<any,any>(API.HOSPITALDOCTOR_URL + `${hoscode}/${depcode}/${workDate}`)

// 获取账号下就诊人信息
export const reqGetUser=()=>request.get<any,any>(API.GETUSER_URL)

// 获取挂号医生的信息
export const reqDoctorInfo=(scheduleId:any)=>request.get<any,any>(API.GETDOCTOR_URL +scheduleId)






